<script setup lang="ts">
// This starter template is using Vue 3 <script setup> SFCs
// Check out https://vuejs.org/api/sfc-script-setup.html#script-setup
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import en from 'element-plus/es/locale/lang/en'
import {ref} from 'vue'
import {useI18n} from 'vue-i18n'
import {useRoute} from 'vue-router'

import HelloWorld from './components/HelloWorld.vue'
import HeaderCommon from './components/layout/HeaderCommon.vue'
import footerCommon from './components/layout/footerCommon.vue'
import {useStore} from '@/store'
const route = useRoute()
const store = useStore()
// const {locale:localeLanguage} = useI18n()
// const locale = ref(zhCn);
// const changeLang =(language:any)=>{
//   locale.value = language
//   localeLanguage.value = language.name
// }
</script>

<template>
  <el-config-provider :locale="store.state.locale">

<!--     头部-->
    <HeaderCommon v-show="route.fullPath.indexOf('login')===-1"></HeaderCommon>
<!--    主体-->
    <div class="container"><router-view /></div>
    <!--  底部-->
    <footerCommon v-show="route.fullPath.indexOf('login')===-1"></footerCommon>
  </el-config-provider>

</template>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>
